package reflectDemo;

public class Student {
    
            private String name = "bit";
    
            //公有属性age
             public int age = 18;
    
            public Student(String name, int age) {
                this.name = name;
                this.age = age;
            }
            public Student(){
                System.out.println("student()");
            }
            private void function(String name){
                System.out.println(name+" am eating");
            }
            private void eat(){
                System.out.println("i am eating");
            }
            public void sleep(){
                System.out.println("i am sleeping");
            }
            public String toString() {
                return "Student{" +
                        "name='" + name + '\'' +
                        ", age=" + age +
                        '}';
            }
    
    }